package com.qf.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.entity.TUser;
import com.qf.mapper.UserMapper;
import com.qf.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>title: com.qf.service.impl</p>
 * description:
 */
@Service
public class UserService implements IUserService {

    @Autowired
    private UserMapper userMapper;



    @Override
    public PageInfo<TUser> selectPage(String page, String size) {

        PageHelper.startPage(Integer.parseInt(page), Integer.parseInt(size));

        List<TUser> tUserList = userMapper.findPage();

        PageInfo<TUser> pageInfo = new PageInfo<>(tUserList);

        return pageInfo;
    }
}